const mongoose = require("../../../db/db");

/**
 * @description 管理系统 产品模型
 */
const Schema = mongoose.Schema({
    id: {
        type: String,
    },
    // //创建日期
    // createDate: {
    //     type: Number,
    // },
    //产品分类id
    // cateId: {
    //     type: String,
    //     require: true
    // },
    //行业类目id
    // classId: {
    //     type: String,
    //     require: true
    // },
    //产品标题
    title: {
        type: String,
        require: true
    },
    //商品简介
    intro: {
        type: String,
        // require: true
    },
    //产品主图
    masterImages: {

    },
    //市场价

    price: {

    },
    //售价
    sellPrice: {

    },
    //上架日期时间
    shelfTime: {
        type: String,
    },
    //详情描述
    description: {

    },
    //排序
    sort: {
        type: Number,
    },
    //状态
    status: {
        type: String,
        default: "1"
    },
    // 是否已经逻辑删除标记
    deleteFlag: {
        type: Boolean,
        default: false
    }
}, {
    versionKey: false,
    timestamps: { createdAt: "createDate", updatedAt: "updateDate" }

})
//product_list
const MAIN_TAB_BRAND = mongoose.model("product_list", Schema);
module.exports = MAIN_TAB_BRAND;